<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_menu', function (Blueprint $table) {
            $table->id('adminMenuId');
            $table->integer('pid');
            $table->string('pids');
            $table->string('name');
            $table->string('module');
            $table->string('path');
            $table->string('title');
            $table->string('component')->comment('路由');
            $table->string('perms')->default('');
            $table->tinyInteger('type')->default(0);
            $table->string('icon')->default('');
            $table->tinyInteger('keepalive')->default(0);
            $table->tinyInteger('sort')->default(0);
            $table->tinyInteger('isLink')->default(0);
            $table->tinyInteger('isHide')->default(0);
            $table->tinyInteger('status')->default(0);
            $table->timestamp('createTime')->nullable();
            $table->timestamp('updateTime')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin_menu');
    }
};
